package org.timemachine.action.facadeBean;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.timemachine.action.facade.ForwardChangeInfoFacade;
import org.timemachine.model.base.ForwardChangeInfo;

@Stateless
public class ForwardChangeInfoFacadeBean implements ForwardChangeInfoFacade {

	@PersistenceContext
	private EntityManager entityManager;


	@Override
	public void createChangeInfo(ForwardChangeInfo forwardChangeInfo) {		
		entityManager.persist(forwardChangeInfo);
	}

	@Override
	public ForwardChangeInfo findById(Long changeInfoId) {
		return entityManager.find(ForwardChangeInfo.class, changeInfoId);
	}

	@Override
	public ForwardChangeInfo findReferenceById(Long changeInfoId) {
		return entityManager.getReference(ForwardChangeInfo.class, changeInfoId);
	}


}
